package org.hiberlyzer.example;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class Album
{
	public Long id;
	public String title;
	public Artist artist;
	public String yearReleased;
	private List<Track> tracks = new ArrayList<Track>();
	
	public Album(Artist artist, String title, String yearReleased)
	{
		this.artist = artist;
		this.title = title;
		this.yearReleased = yearReleased;
	}
	
	public void addTrack(Track track)
	{
		this.tracks.add(track);
	}
	
	public List<Track> getTracks()
	{
		return Collections.unmodifiableList(tracks);
	}
	
	private Album(){}
}
